package io.renren.modules.quickService.service;

import com.baomidou.mybatisplus.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.modules.quickService.entity.OrderEntity;
import io.renren.modules.quickService.vo.OrderOperate;
import io.renren.modules.quickService.vo.OrderStatistics;
import io.renren.modules.sys.entity.SysUserEntity;

import java.util.List;
import java.util.Map;

/**
 * 订单表
 *
 * @author zenger380
 * @email zenger380@163.com
 * @date 2018-09-19 17:05:51
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage2(Map<String, Object> params);

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 接单
     * @param orderOperate
     * @param userId
     */
    boolean takeOrder(OrderOperate orderOperate, Long userId);
    /**
     * 抢单
     * @param orderOperate
     * @param userId
     */
    boolean contend(OrderOperate orderOperate, Long userId);
    /**
     * 拒单
     * @param orderOperate
     * @param userId
     */
    boolean refuseOrder(OrderOperate orderOperate, Long userId);
    /**
     * 看现场
     * @param orderOperate
     * @param userId
     */
    boolean visiting(OrderOperate orderOperate,Long userId);
    /**
     * 签协议
     * @param orderOperate
     * @param userId
     */
    boolean agreement(OrderOperate orderOperate,Long userId);
    /**
     * 中期验收
     * @param orderOperate
     * @param userId
     */
    boolean confirm(OrderOperate orderOperate,Long userId);
    /**
     * 完成施工
     * @param orderOperate
     * @param userId
     */
    boolean complete(OrderOperate orderOperate,Long userId);

    /**
     * 完工审核
     * @param order
     * @param user
     * @return
     */
    boolean completeAudit(OrderEntity order, SysUserEntity user);

    /**
     * 完成对账
     * @param order
     * @param user
     * @return
     */
    boolean accountChecking(OrderEntity order, SysUserEntity user);
    /**
     * 申请售后
     * @param order
     * @param user
     * @return
     */
    boolean afterSales(OrderEntity order, SysUserEntity user);

    /**
     * 个人订单状态统计
     * @param userId 个人编号
     * @return  List<OrderStatistics>
     */
    List<OrderStatistics> statistics(Long userId);
}

